Optimal. Leaf size=116 \[ \frac {7}{8} a c^4 x+\frac {7 a c^4 \cos ^3(e+f x)}{12 f}+\frac {7 a c^4 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{5 f}+\frac {7 a \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{20 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {2815, 2757,
2748, 2715, 8} \begin {gather*} \frac {7 a c^4 \cos ^3(e+f x)}{12 f}+\frac {7 a \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{20 f}+\frac {7 a c^4 \sin (e+f x) \cos (e+f x)}{8 f}+\frac {7}{8} a c^4 x+\frac {a \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{5 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2748
Rule 2757
Rule 2815
Rubi steps
\begin {align*} \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx &=(a c) \int \cos ^2(e+f x) (c-c \sin (e+f x))^3 \, dx\\ &=\frac {a \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{5 f}+\frac {1}{5} \left (7 a c^2\right ) \int \cos ^2(e+f x) (c-c \sin (e+f x))^2 \, dx\\ &=\frac {a \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{5 f}+\frac {7 a \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{20 f}+\frac {1}{4} \left (7 a c^3\right ) \int \cos ^2(e+f x) (c-c \sin (e+f x)) \, dx\\ &=\frac {7 a c^4 \cos ^3(e+f x)}{12 f}+\frac {a \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{5 f}+\frac {7 a \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{20 f}+\frac {1}{4} \left (7 a c^4\right ) \int \cos ^2(e+f x) \, dx\\ &=\frac {7 a c^4 \cos ^3(e+f x)}{12 f}+\frac {7 a c^4 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{5 f}+\frac {7 a \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{20 f}+\frac {1}{8} \left (7 a c^4\right ) \int 1 \, dx\\ &=\frac {7}{8} a c^4 x+\frac {7 a c^4 \cos ^3(e+f x)}{12 f}+\frac {7 a c^4 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{5 f}+\frac {7 a \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{20 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.37, size = 64, normalized size = 0.55 \begin {gather*} \frac {a c^4 (420 f x+420 \cos (e+f x)+130 \cos (3 (e+f x))-6 \cos (5 (e+f x))+120 \sin (2 (e+f x))-45 \sin (4 (e+f x)))}{480 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.32, size = 149, normalized size = 1.28
method | result | size |
risch | \(\frac {7 a \,c^{4} x}{8}+\frac {7 a \,c^{4} \cos \left (f x +e \right )}{8 f}-\frac {a \,c^{4} \cos \left (5 f x +5 e \right )}{80 f}-\frac {3 a \,c^{4} \sin \left (4 f x +4 e \right )}{32 f}+\frac {13 a \,c^{4} \cos \left (3 f x +3 e \right )}{48 f}+\frac {a \,c^{4} \sin \left (2 f x +2 e \right )}{4 f}\) | \(96\) |
derivativedivides | \(\frac {-\frac {a \,c^{4} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}-3 a \,c^{4} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a \,c^{4} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a \,c^{4} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+3 a \,c^{4} \cos \left (f x +e \right )+a \,c^{4} \left (f x +e \right )}{f}\) | \(149\) |
default | \(\frac {-\frac {a \,c^{4} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}-3 a \,c^{4} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a \,c^{4} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a \,c^{4} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+3 a \,c^{4} \cos \left (f x +e \right )+a \,c^{4} \left (f x +e \right )}{f}\) | \(149\) |
norman | \(\frac {\frac {6 a \,c^{4} \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {34 a \,c^{4}}{15 f}+\frac {7 a \,c^{4} x}{8}+\frac {20 a \,c^{4} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}+\frac {16 a \,c^{4} \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {16 a \,c^{4} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}+\frac {a \,c^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {13 a \,c^{4} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}-\frac {13 a \,c^{4} \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}-\frac {a \,c^{4} \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {35 a \,c^{4} x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}+\frac {35 a \,c^{4} x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {35 a \,c^{4} x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {35 a \,c^{4} x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}+\frac {7 a \,c^{4} x \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{5}}\) | \(282\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 158, normalized size = 1.36 \begin {gather*} -\frac {32 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} a c^{4} - 320 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a c^{4} + 45 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{4} - 240 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{4} - 480 \, {\left (f x + e\right )} a c^{4} - 1440 \, a c^{4} \cos \left (f x + e\right )}{480 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 82, normalized size = 0.71 \begin {gather*} -\frac {24 \, a c^{4} \cos \left (f x + e\right )^{5} - 160 \, a c^{4} \cos \left (f x + e\right )^{3} - 105 \, a c^{4} f x + 15 \, {\left (6 \, a c^{4} \cos \left (f x + e\right )^{3} - 7 \, a c^{4} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{120 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 314 vs.
\(2 (109) = 218\).
time = 0.34, size = 314, normalized size = 2.71 \begin {gather*} \begin {cases} - \frac {9 a c^{4} x \sin ^{4}{\left (e + f x \right )}}{8} - \frac {9 a c^{4} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + a c^{4} x \sin ^{2}{\left (e + f x \right )} - \frac {9 a c^{4} x \cos ^{4}{\left (e + f x \right )}}{8} + a c^{4} x \cos ^{2}{\left (e + f x \right )} + a c^{4} x - \frac {a c^{4} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {15 a c^{4} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {4 a c^{4} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {2 a c^{4} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {9 a c^{4} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {a c^{4} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {8 a c^{4} \cos ^{5}{\left (e + f x \right )}}{15 f} - \frac {4 a c^{4} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 a c^{4} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a \sin {\left (e \right )} + a\right ) \left (- c \sin {\left (e \right )} + c\right )^{4} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 100, normalized size = 0.86 \begin {gather*} \frac {7}{8} \, a c^{4} x - \frac {a c^{4} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {13 \, a c^{4} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} + \frac {7 \, a c^{4} \cos \left (f x + e\right )}{8 \, f} - \frac {3 \, a c^{4} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {a c^{4} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.86, size = 292, normalized size = 2.52 \begin {gather*} \frac {7\,a\,c^4\,x}{8}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{24}-\frac {a\,c^4\,\left (525\,e+525\,f\,x+640\right )}{120}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{24}-\frac {a\,c^4\,\left (525\,e+525\,f\,x+720\right )}{120}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{12}-\frac {a\,c^4\,\left (1050\,e+1050\,f\,x+800\right )}{120}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{12}-\frac {a\,c^4\,\left (1050\,e+1050\,f\,x+1920\right )}{120}\right )-\frac {a\,c^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}-\frac {13\,a\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{2}+\frac {13\,a\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{2}+\frac {a\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9}{4}+\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{120}-\frac {a\,c^4\,\left (105\,e+105\,f\,x+272\right )}{120}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________